Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle the errors when the listener socket is closed gracefully. #2373

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hessjcg
Copy link
Collaborator

@hessjcg hessjcg commented Jan 21, 2025

The accept loop for socket connections now will properly handle the error case where the listener socket
is closed gracefully.

Fixes #2372

@enocom
Copy link
Member

enocom commented Jan 21, 2025

Nice find! This probably deserves a test, if only of the private method, so that future maintainers don't trip over this again.

@hessjcg
Copy link
Collaborator Author

hessjcg commented Jan 29, 2025

I'm converting this back to a draft, because after some testing, the errors returned from l.Accept() on socket close are not exactly as documented.

@hessjcg hessjcg marked this pull request as draft January 29, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept loop has improper error handling, causing wrong exit code.
3 participants